import java.awt.Dimension;
import java.awt.image.BufferedImage;

import com.github.sarxos.webcam.*;

public class Camera {

	Dimension[] resolution;
	Webcam cam;
	BufferedImage img;
	
	public Camera(int height, int width) {
		cam = Webcam.getDefault();
		cam.setViewSize(new Dimension(width, height));
		img = null;
		cam.open();
	}
	
	public BufferedImage getimage() {
		img = cam.getImage();
		return img;
	}

}
